<template>
    <template v-if="value">
        <template v-for="(item, key) of value">
            <el-tag :type="key == 0 ? 'primary' : key == 1 ? 'success' : key % 2 == 0 ? 'danger' : key % 3 == 0 ? 'warning' : 'info'" :size="size"> {{ item }} </el-tag>&nbsp;
        </template>
    </template>
</template>

<script setup lang="ts">
//父传子
interface Props {
    value?: Array<string> | [] | null;
    size?: string;
}
withDefaults(defineProps<Props>(), {
    value: null,
    size: "default",
});
</script>

<style scoped lang="less"></style>
